from django.db import models

from prj002.models.models import CreatTimeModel
from prj002.models.info import Info
from myuser.models import MyUser


class Cure(CreatTimeModel):

    info = models.OneToOneField(Info, on_delete=models.CASCADE, related_name='cure')

    owner = models.ForeignKey(MyUser, on_delete=models.CASCADE, related_name='prj002_cure')

    shenghuo_eat = models.BooleanField(blank=True, null=True, verbose_name='饮食控制', help_text='饮食控制')

    SHENGHUO_SPORT_CHOICES = (
        ('无', '无'),
        ('偶尔', '偶尔'),
        ('一周1-2次', '一周1-2次'),
        ('一周3-5次', '一周3-5次'),
        ('每天', '每天'),
    )
    shenghuo_sport = models.CharField(choices=SHENGHUO_SPORT_CHOICES, max_length=10, blank=True, null=True, verbose_name='饮食控制', help_text='饮食控制')

    shenghuo_xingwei_wu = models.BooleanField(blank=True, default=False, verbose_name='无', help_text='无')
    shenghuo_xingwei_xinli = models.BooleanField(blank=True, default=False, verbose_name='接受心理疏导', help_text='接受心理疏导')
    shenghuo_xingwei_qingxu = models.BooleanField(blank=True, default=False, verbose_name='改善情绪，保持乐观心态', help_text='改善情绪，保持乐观心态')
    shenghuo_xingwei_yanjiu = models.BooleanField(blank=True, default=False, verbose_name='戒烟戒酒', help_text='戒烟戒酒')
    shenghuo_xingwei_shuimian = models.BooleanField(blank=True, default=False, verbose_name='有增加睡眠时间，提高睡眠质量', help_text='有增加睡眠时间，提高睡眠质量')

    cure_zhong = models.BooleanField(blank=True, default=False, verbose_name='中医治疗', help_text='中医治疗')
    cure_xi = models.BooleanField(blank=True, default=False, verbose_name='西医治疗', help_text='西医治疗')
    cure_jiehe = models.BooleanField(blank=True, default=False, verbose_name='中西医结合治疗', help_text='中西医结合治疗')

    zhong_xu_yiqi = models.BooleanField(blank=True, default=False, verbose_name='益气健脾养血', help_text='益气健脾养血')
    zhong_xu_shen = models.BooleanField(blank=True, default=False, verbose_name='补肾助阳，温中健脾', help_text='补肾助阳，温中健脾')
    zhong_xu_jianpi = models.BooleanField(blank=True, default=False, verbose_name='健脾温阳', help_text='健脾温阳')
    zhong_xu_bushen = models.BooleanField(blank=True, default=False, verbose_name='补肾益气', help_text='补肾益气')
    zhong_xu_ziyin = models.BooleanField(blank=True, default=False, verbose_name='滋阴补肾', help_text='滋阴补肾')
    zhong_xu_wenshen = models.BooleanField(blank=True, default=False, verbose_name='温肾助阳，调补冲任', help_text='温肾助阳，调补冲任')
    zhong_xu_buxue = models.BooleanField(blank=True, default=False, verbose_name='补血益气', help_text='补血益气')
    zhong_xu_yangyin = models.BooleanField(blank=True, default=False, verbose_name='养阴清热', help_text='养阴清热')
    zhong_xu_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='治法-虚证-其他', help_text='治法-虚证-其他')

    zhong_shi_xiegan = models.BooleanField(blank=True, default=False, verbose_name='泻肝清热除湿', help_text='泻肝清热除湿')
    zhong_shi_jieyu = models.BooleanField(blank=True, default=False, verbose_name='疏肝解郁理气调冲', help_text='疏肝解郁理气调冲')
    zhong_shi_shugan = models.BooleanField(blank=True, default=False, verbose_name='疏肝解郁清热', help_text='疏肝解郁清热')
    zhong_shi_liqi = models.BooleanField(blank=True, default=False, verbose_name='理气化瘀活血', help_text='理气化瘀活血')
    zhong_shi_zaoshi = models.BooleanField(blank=True, default=False, verbose_name='燥湿化痰', help_text='燥湿化痰')
    zhong_shi_huatan = models.BooleanField(blank=True, default=False, verbose_name='化痰祛瘀活血', help_text='化痰祛瘀活血')
    zhong_shi_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='治法-实证-其他', help_text='治法-实证-其他')

    zhong_xushi_huatan = models.BooleanField(blank=True, default=False, verbose_name='健脾祛湿化痰', help_text='健脾祛湿化痰')
    zhong_xushi_liqi = models.BooleanField(blank=True, default=False, verbose_name='补肾益精，疏肝理气', help_text='补肾益精，疏肝理气')
    zhong_xushi_zaoshi = models.BooleanField(blank=True, default=False, verbose_name='补肾益精，化痰燥湿', help_text='补肾益精，化痰燥湿')
    zhong_xushi_yijing = models.BooleanField(blank=True, default=False, verbose_name='补肾益精，活血化痰', help_text='补肾益精，活血化痰')
    zhong_xushi_tiaojing = models.BooleanField(blank=True, default=False, verbose_name='滋肾清热调经', help_text='滋肾清热调经')
    zhong_xushi_qingre = models.BooleanField(blank=True, default=False, verbose_name='滋肾清热，化瘀利湿', help_text='滋肾清热，化瘀利湿')
    zhong_xushi_bushen = models.BooleanField(blank=True, default=False, verbose_name='补肾清热，化瘀利湿', help_text='补肾清热，化瘀利湿')
    zhong_xushi_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='治法-虚实夹杂证-其他', help_text='治法-虚实夹杂证-其他')

    is_cure_zhong_time = models.BooleanField(blank=True, default=False, verbose_name='已就诊时间是否≥3个月', help_text='已就诊时间是否≥3个月')
    cure_zhong_time = models.CharField(max_length=10, blank=True, null=True, verbose_name='已就诊时间', help_text='已就诊时间')
    cure_zhong_pailuan = models.IntegerField(blank=True, null=True, verbose_name='自主排卵月经次数', help_text='自主排卵月经次数')
    cure_zhong_pailuan_bxray = models.BooleanField(blank=True, default=False, verbose_name='B超', help_text='B超')
    cure_zhong_pailuan_yuntong = models.BooleanField(blank=True, default=False, verbose_name='孕酮', help_text='孕酮')
    cure_zhong_pailuan_tiwen = models.BooleanField(blank=True, default=False, verbose_name='基础体温', help_text='基础体温')
    cure_zhong_time_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='其他', help_text='其他')

    fangyao = models.CharField(max_length=200, blank=True, null=True, verbose_name='选用方药及剂量', help_text='选用方药及剂量')
    zhongchengyao = models.BooleanField(blank=True, default=False, verbose_name='中成药', help_text='中成药')
    zhongchengyao_detail = models.CharField(max_length=50, blank=True, null=True, verbose_name='中成药-具体药物', help_text='中成药-具体药物')

    tiaozhou = models.BooleanField(blank=True, default=False, verbose_name='调周法', help_text='调周法')
    tiaozhou_qi = models.CharField(max_length=6, blank=True, null=True, verbose_name='分期', help_text='分期')
    tiaozhou_detail = models.CharField(max_length=200, blank=True, null=True, verbose_name='各期治法与方药', help_text='各期治法与方药')

    zhenci = models.BooleanField(blank=True, default=False, verbose_name='针刺', help_text='针刺')
    zhenci_xuewei = models.CharField(max_length=100, blank=True, null=True, verbose_name='针刺-具体学位', help_text='针刺-具体学位')
    zhenci_shoufa = models.CharField(max_length=100, blank=True, null=True, verbose_name='针刺-手法', help_text='针刺-手法')

    xi_yuejing = models.BooleanField(blank=True, default=False, verbose_name='调整月经周期治疗', help_text='调整月经周期治疗')
    xi_yuejing_biyun_da = models.BooleanField(blank=True, default=False, verbose_name='达英35', help_text='达英35')
    xi_yuejing_biyun_ma = models.BooleanField(blank=True, default=False, verbose_name='妈富隆', help_text='妈富隆')
    xi_yuejing_biyun_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='避孕药类-其他', help_text='避孕药类-其他')
    xi_yuejing_jisu_diqu = models.BooleanField(blank=True, default=False, verbose_name='地屈孕酮', help_text='地屈孕酮')
    xi_yuejing_jisu_weili = models.BooleanField(blank=True, default=False, verbose_name='微粒化黄体酮', help_text='微粒化黄体酮')
    xi_yuejing_jisu_huangti = models.BooleanField(blank=True, default=False, verbose_name='黄体酮', help_text='黄体酮')
    xi_yuejing_jisu_cusuan = models.BooleanField(blank=True, default=False, verbose_name='醋酸甲羟孕酮', help_text='醋酸甲羟孕酮')
    xi_yuejing_jisu_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='孕激素类-其他', help_text='孕激素类-其他')

    xi_ciyunjisu = models.CharField(max_length=50, blank=True, null=True, verbose_name='雌孕激素周期序贯治疗', help_text='雌孕激素周期序贯治疗')

    xuexiong_shui = models.BooleanField(blank=True, default=False, verbose_name='降低血雄激素水平治疗', help_text='降低血雄激素水平治疗')
    xuexiong_tang = models.BooleanField(blank=True, default=False, verbose_name='糖皮质激素类', help_text='糖皮质激素类')
    xuexiong_huan = models.BooleanField(blank=True, default=False, verbose_name='环丙孕酮', help_text='环丙孕酮')
    xuexiong_luo = models.BooleanField(blank=True, default=False, verbose_name='螺内酯', help_text='螺内酯')
    xuexiong_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='降低血雄激素水平治疗-其他', help_text='降低血雄激素水平治疗-其他')

    yidaosu = models.BooleanField(blank=True, default=False, verbose_name='改善胰岛素抵抗治疗', help_text='改善胰岛素抵抗治疗')
    yidaosu_erjia = models.BooleanField(blank=True, default=False, verbose_name='二甲双胍类', help_text='二甲双胍类')
    yidaosu_gelie = models.BooleanField(blank=True, default=False, verbose_name='吡格列酮', help_text='吡格列酮')
    yidaosu_aka = models.BooleanField(blank=True, default=False, verbose_name='阿卡波糖', help_text='阿卡波糖')
    yidaosu_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='改善胰岛素抵抗治疗-其他', help_text='改善胰岛素抵抗治疗-其他')

    youfa = models.BooleanField(blank=True, default=False, verbose_name='诱发排卵治疗', help_text='诱发排卵治疗')

    youfa_mi = models.BooleanField(blank=True, default=False, verbose_name='氯米芬', help_text='氯米芬')
    youfa_lai = models.BooleanField(blank=True, default=False, verbose_name='来曲唑', help_text='来曲唑')
    youfa_cu = models.BooleanField(blank=True, default=False, verbose_name='促性腺激素', help_text='促性腺激素')
    youfa_hm = models.BooleanField(blank=True, default=False, verbose_name='hMG', help_text='hMG')
    youfa_hp = models.BooleanField(blank=True, default=False, verbose_name='HP-FSH', help_text='HP-FSH')
    youfa_rf = models.BooleanField(blank=True, default=False, verbose_name='rFSH', help_text='rFSH')
    youfa_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='诱发排卵治疗-其他', help_text='诱发排卵治疗-其他')

    shengyu = models.BooleanField(blank=True, default=False, verbose_name='促进生育', help_text='促进生育')
    shengyu_fu = models.BooleanField(blank=True, default=False, verbose_name='腹腔镜下卵巢打孔术', help_text='腹腔镜下卵巢打孔术')
    shengyu_iv = models.BooleanField(blank=True, default=False, verbose_name='IVF-ET', help_text='IVF-ET')
    shengyu_tiwai = models.BooleanField(blank=True, default=False, verbose_name='体外成熟培养', help_text='体外成熟培养')
    shengyu_yidao = models.BooleanField(blank=True, default=False, verbose_name='胰岛素增敏剂', help_text='胰岛素增敏剂')
    shengyu_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='促进生育-其他', help_text='促进生育-其他')

    xi_xinli = models.BooleanField(blank=True, default=False, verbose_name='是否接受心理治疗', help_text='是否接受心理治疗')

    xi_other = models.BooleanField(blank=True, default=False, verbose_name='其他治疗', help_text='其他治疗')
    xi_other_qita = models.CharField(max_length=50, blank=True, null=True, verbose_name='其他治疗-是', help_text='其他治疗-是')

    def __str__(self):
        return '%s-%s' % (self.pk, self.info)

    class Meta:
        verbose_name = '治疗'
        verbose_name_plural = verbose_name
